home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -screenplay- / shareware / amigapmars / primer.cdb < prev    next >
Text File  |  1994-05-09  |  3KB  |  52 lines

  1.                     A cdb primer
  2.                     ~~~~~~~~~~~~
  3. The pMARS debugger cdb may be a bit daunting at first because of the
  4. sheer number of commands. All you really need to know to get started
  5. however are a few basic commands: list, step, go, continue, trace,
  6. untrace and most important, help :-).
  7.  
  8. Cdb has a command-driven interface for portability reasons, but you 
  9. can assign DOS function and extended keys to commonly used commands 
  10. or command sequences. Read the pMARS documentation to find out more 
  11. about this and many advanced features not covered here.
  12.  
  13. "List" lets you view core addresses. E.g. "list 100" displays address
  14. 100, and "list 0,9" lists the first 10 addresses. You can abbreviate
  15. the word "list" to a single letter or drop it entirely, i.e. "0,9"
  16. for the last example. If you start a number with a plus or minus, it
  17. is taken to be relative to the last address displayed: "-1,-20"
  18. displays 20 addresses in the backward direction, and if you keep
  19. hitting <enter> this becomes a convenient way to scroll through core.
  20.  
  21. The special symbols A and B hold the values of the A and B-field of 
  22. the instruction displayed last: "list +B" shows the address the 
  23. B-field is pointing to; enter "list +B" again (or just <enter>) and 
  24. you have the address of the original instruction is pointing to in 
  25. indirect addressing mode. Another useful symbol is PC which holds the 
  26. address of the instruction about to be executed; "l pc" and you're 
  27. back to where you started after foraging through core.
  28.  
  29. "Step" executes the next instruction in the process queue and
  30. immediately returns to the cdb prompt after displaying the following
  31. instruction. If you're not interested in what the other warrior is
  32. doing, enter "skip 1".
  33.  
  34. "Go" executes instructions until either a trace point is executed
  35. (see below) or until the end of the round for "post-mortem"
  36. debugging. "Continue" skips past trace points and end of rounds,
  37. although you can still enter cdb if you hit "d" in the DOS display
  38. version, Control-C in the UNIX version or any key in the DOS
  39. no-display version. If you enter "go 7", execution will resume with
  40. address 7. This comes in handy, e.g. if you are debugging a scanner,
  41. put a trace after the scanning portion and want to resume execution
  42. without actually planting a bomb. This works with "step" and
  43. "continue" as well.
  44.  
  45. "Trace" puts a trace point on an address or a range of addresses;
  46. "untrace" removes trace points. These commands take the same
  47. address or address range as "list". By default, trace points are
  48. copied along with the instruction by "MOV.I". This means you can
  49. trace the SPL bomb of your scanner and reenter the debugger as soon
  50. as the opponent executes the bomb. If you don't want trace points to
  51. be copied, enter the command "moveable off".
  52.